
import java.io.File;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author loli
 */
public class Tmp {
    public static void main(String[] args) throws Exception {
       String s = "%album%-%title%-%artist%/%genre%";
       String[] sp = s.split("/");
       System.out.println(sp[sp.length-1]);
       s = "%album%-%title%-%artist%%genre%";
       sp = s.split("/");
       System.out.println(sp[sp.length-1]);
    }
}
